STEP 7: Let's make the ball glide to the random height!

  • Delete the line that says print(True) from inside the if statement.
  • In GRAPHICS, go to and drag in Glide To INSIDE your if statement.
  • Change the name of .glide_to() from sprite to ball. You should see this next to it: ··=·····
  • Change the x-coordinate from -100 to 300 and the y-coordinate from 50 to random_height.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)